using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;

public class GameObjectPlayableAsset : PlayableAsset
{
    public ExposedReference<GameObject> target;
    public bool show;
    public bool revertOnEnd;
    public int effectId;

    public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
    {
        var playable = ScriptPlayable<GameObjectPlayableBehaviour>.Create(graph);
        var behaviour = playable.GetBehaviour();
        behaviour.target = target.Resolve(graph.GetResolver());
        behaviour.show = show;
        behaviour.revertOnEnd = revertOnEnd;
        behaviour.effectId = effectId;
        return playable;
    }
}
